<?php

namespace App\Console\Commands;

use App\Models\User;
use Illuminate\Console\Command;

class CountActiveUsers extends Command{
    protected $signature = 'bbschat:count_active_users';
    protected $description = '获取活跃用户的数据';
    public function handle(User $user){
        $this->info('正在获取活跃用户的数据...');
        $user->countAndCacheActiveUsers();
        $this->info('获取活跃用户的数据完成');
    }
}
